import axiosInstance from "../axiosinstance";

const userInfo={
    //同名结构，前端传送也必须是这个名字
    add({nickName,user_sex ,user_phone,user_email,user_photo,password}){
        return axiosInstance.post('/userInfo/add',{
            nickName,user_sex ,user_phone,user_email,user_photo,password
        })
    },
    checkLogin({zh ,password}){
        return axiosInstance.post('/userInfo/checkLogin',{
            zh ,password
        })
    },
    uploadUserPhoto(file){
        let formData=new FormData();
        formData.append("user_photo",file);
        console.log(formData,"formData")
        return axiosInstance.post('/userInfo/checkLogin',formData,{
            headers:{
                "Content-Type":'multipart/form-data'
            }
        })
    },


}

export default userInfo